package com.shuda.business.engine.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 字段映射配置DTO
 * 用于接收和返回字段映射配置数据
 * 
 * @author ink
 * @Description: 字段映射配置DTO
 * @date 2024-10-10 14:50:00
 */
@Data
@Schema(description = "字段映射配置DTO")
public class FieldMappingDTO {

    @Schema(description = "映射ID")
    private Long id;

    @Schema(description = "渠道ID", required = true)
    @NotNull(message = "渠道ID不能为空")
    private Long channelId;

    @Schema(description = "渠道名称")
    private String channelName;

    @Schema(description = "源字段名", required = true)
    @NotBlank(message = "源字段名不能为空")
    private String sourceField;

    @Schema(description = "目标字段名", required = true)
    @NotBlank(message = "目标字段名不能为空")
    private String targetField;

    @Schema(description = "字段映射规则(JSON格式存储)")
    private String mappingRule;

    @Schema(description = "转换脚本")
    private String transformScript;

    @Schema(description = "脚本语言(javascript-groovy,python)")
    private String scriptLanguage;

    @Schema(description = "配置状态(enabled-启用,disabled-禁用)")
    private String status;

    @Schema(description = "描述信息")
    private String description;
}